<HTML>
<HEAD>
<TITLE>JavaScript Source Code 3000:  Forms:  Multiple Mailer</TITLE>
<META HTTP-EQUIV="JavaScript Source Code 3000" CONTENT = "no-cache">
<META NAME="date" CONTENT="2000-09-09">
<META NAME="channel" CONTENT="Web Developer">
<META NAME="author" CONTENT="Jeff Kieke">
<META NAME="section" CONTENT="Forms">
<META NAME="description" CONTENT="JavaScript can help you send an e-mail to anyone on your "list".  Just use the pulldown menu to select a recipient, compose your message, and hit 'Send Message' to send it.  This too, is another good JavaScript example for all beginners to learn from.">
</HEAD>

<BODY BGCOLOR=#ffffff vlink=#0000ff>

<BR>
<center>
<table width="600" cellpadding="0" cellspacing="10">
<tr>
<td width="468" align="center">

	
</td>
<td width="120" align="center">

	
</td>
</tr>
</table>
<BR>
<BR>
<BASEFONT SIZE=3>
  <FONT SIZE=6>
<B><FONT SIZE="+2" FACE="Helvetica,Arial" ALIGN=RIGHT COLOR="#0000FF">
<b><A HREF="../index.htm" /" TARGET="_top">
Home</A> </b><img src="../img/arrow.gif" /img/arrow.gif" height=13 width=7 border=0 alt="}"> <b><A HREF="index.htm" /forms/" ><font color="#FF0000">Forms</font></A> </b>
<img src="../img/arrow.gif" /img/arrow.gif" height=13 width=7 border=0 alt="}"> <FONT COLOR="#006666">Multiple Mailer</FONT></b></FONT><BR>
</B><BR>
  </FONT>
<TABLE BORDER=0 WIDTH=500 CELLPADDING=3 CELLSPACING=0>
<tr><td><font FACE=" helvetica,arial,geneva">
<br>
<br>
<!-- Description --><!--content_start-->

JavaScript can help you send an e-mail to anyone on your "list".  Just use the pulldown menu to select a recipient, compose your message, and hit 'Send Message' to send it.  This too, is another good JavaScript example for all beginners to learn from.<br><hr>
</td></tr>
</table>
<!--  Demonstration -->
<FORM NAME="mailer" METHOD="post" ACTION="" ENCTYPE="text/plain" onSubmit="(document.mailer.action += mailtoandsubject)"> 
<TABLE BORDER=0>
<TR VALIGN="top">
<TD>Recipient:</TD>
<TD><SELECT NAME="mailtoperson" onChange="msg(this.form)">
<OPTION VALUE="">-- Select --
<OPTION VALUE="person1@aol.com">person1@aol.com
<OPTION VALUE="person2@aol.com">person2@aol.com
<OPTION VALUE="person3@aol.com">person3@aol.com
</SELECT></TD>
</TR>
<TR VALIGN="top">
<TD>Your Name:</TD>
<TD><INPUT TYPE="text" SIZE=45 NAME="name" onChange="msg(this.form)"></TD>
</TR>
<TR VALIGN="top">
<TD>Your Email:</TD>
<TD><INPUT TYPE="text" SIZE=45 NAME="email" onChange="msg(this.form)"></TD>
</TR>
<TR VALIGN="top">
<TD>Priority:</TD>
<TD>
<SELECT NAME="priority" onChange="msg(this.form)">
<OPTION VALUE="Normal">Normal
<OPTION VALUE="Urgent">Urgent
<OPTION VALUE="No Reply Needed">No reply needed
</SELECT></TD>
</TR>
<TR VALIGN="top">
<TD>Subject:</TD>
<TD><INPUT TYPE="text" SIZE=45 NAME="subject" onChange="msg(this.form)"></TD>
</TR>
<TR VALIGN="top">
<TD>Message:</TD>
<TD><TEXTAREA NAME="message" COLS=45 ROWS=5 WRAP="virtual" OnChange="msg(this.form)"></TEXTAREA></TD>
</TR>
<TR>
<TD>&nbsp;</TD>
<TD><INPUT TYPE="submit" VALUE="Send Message">
<INPUT TYPE="reset" VALUE="Reset"></TD>
</TR>
</TABLE>
</FORM>

<SCRIPT LANGUAGE="JavaScript">
function msg() {
document.mailer.action = "mailto:" 
mailtoandsubject = ((document.mailer.mailtoperson.options[document.mailer.mailtoperson.selectedIndex].value) + '?subject=' + document.mailer.subject.value); 
} 
</SCRIPT> 
<P>
<BR>
<P>
<a name="source">
<TABLE BORDER=0 WIDTH=500 CELLPADDING=3 CELLSPACING=0>
<tr><td BGCOLOR=yellow><font FACE="helvetica,arial,geneva"><b>JavaScript Source Code 3000:  Forms:  Multiple Mailer</b>
<p>Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as NotePad or SimpleText) and save (Control-s or Apple-s).  The script is yours!<br><br></font></td></tr>
<tr><td BGCOLOR=yellow ALIGN=CENTER>
<form NAME="copy">

<DIV align="center">
<input type=button value="Highlight All" onClick="javascript:this.form.txt.focus();this.form.txt.select();">&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT TYPE="text" NAME="total" VALUE="Script Size:  1.78 KB  " size="24">
</DIV>

<textarea NAME="txt" ROWS=20 COLS=75 WRAP=VIRTUAL>

&lt;FORM NAME="mailer" METHOD="post" ACTION="" ENCTYPE="text/plain" 
onSubmit="(document.mailer.action += mailtoandsubject)"&gt; 

&lt;!-- Original:  Jeff Kieke --&gt;

&lt;! &gt;
&lt;! &gt;

&lt;TABLE BORDER=0&gt;
&lt;TR VALIGN="top"&gt;
&lt;TD&gt;Recipient:&lt;/TD&gt;
&lt;TD&gt;&lt;SELECT NAME="mailtoperson" onChange="msg(this.form)"&gt;
&lt;OPTION VALUE=""&gt;-- Select --
&lt;OPTION VALUE="person1@aol.com"&gt;person1@aol.com
&lt;OPTION VALUE="person2@aol.com"&gt;person2@aol.com
&lt;OPTION VALUE="person3@aol.com"&gt;person3@aol.com
&lt;/SELECT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR VALIGN="top"&gt;
&lt;TD&gt;Your Name:&lt;/TD&gt;
&lt;TD&gt;&lt;INPUT TYPE="text" SIZE=45 NAME="name" onChange="msg(this.form)"&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR VALIGN="top"&gt;
&lt;TD&gt;Your Email:&lt;/TD&gt;
&lt;TD&gt;&lt;INPUT TYPE="text" SIZE=45 NAME="email" onChange="msg(this.form)"&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR VALIGN="top"&gt;
&lt;TD&gt;Priority:&lt;/TD&gt;
&lt;TD&gt;
&lt;SELECT NAME="priority" onChange="msg(this.form)"&gt;
&lt;OPTION VALUE="Normal"&gt;Normal
&lt;OPTION VALUE="Urgent"&gt;Urgent
&lt;OPTION VALUE="No Reply Needed"&gt;No reply needed
&lt;/SELECT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR VALIGN="top"&gt;
&lt;TD&gt;Subject:&lt;/TD&gt;
&lt;TD&gt;&lt;INPUT TYPE="text" SIZE=45 NAME="subject" onChange="msg(this.form)"&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR VALIGN="top"&gt;
&lt;TD&gt;Message:&lt;/TD&gt;
&lt;TD&gt;&lt;TEXTAREA NAME="message" COLS=45 ROWS=5 WRAP="virtual" OnChange="msg(this.form)"&gt;&lt;/TEXTAREA&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&nbsp;&lt;/TD&gt;
&lt;TD&gt;&lt;INPUT TYPE="submit" VALUE="Send Message"&gt;
&lt;INPUT TYPE="reset" VALUE="Reset"&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;/FORM&gt;

&lt;SCRIPT LANGUAGE="JavaScript"&gt;
function msg() {
document.mailer.action = "mailto:" 
mailtoandsubject = ((document.mailer.mailtoperson.options[document.mailer.mailtoperson.selectedIndex].value) + '?subject=' + document.mailer.subject.value); 
} 
&lt;/SCRIPT&gt; 

 

&lt;!-- Script Size:  1.78 KB  --&gt;</textarea><br><font FACE="helvetica,arial,geneva"></font></td></tr>

</table>
</form>
</FONT>
</CENTER>


</center>
</body></html>